<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition template="template.xhtml" xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ice="http://www.icesoft.com/icefaces/component">

    <ui:define name="head">
    </ui:define>

    <ui:define name="pagetitle">
        Database fill
    </ui:define>

    <ui:define name="content">
        <h1>Support functionality</h1>
        
        <ice:form id="fillDatabaseForm">
            <h3>Abstract</h3>
            <p>Quick login</p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.login}"
                               id="fastLogin"/>

            <p>Clear database <ice:outputText rendered="#{fillDbController.clearDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.clearDatabase}"
                               id="clearDatabase"/>





            <h3>Entities</h3>
            <p>Stakeholder roles <ice:outputText rendered="#{fillDbController.rolesDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addStakeholderRoles}"
                               id="addRoles"/>

            <p>States <ice:outputText rendered="#{fillDbController.statesDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addStates}"
                               id="addStates"/>

            <p>Templates <ice:outputText rendered="#{fillDbController.templatesDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addDecisionTemplates}"
                               id="addTemplates"/>

            <p>Relationship types <ice:outputText rendered="#{fillDbController.relationshipTypesDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addRelationshipTypes}"
                               id="addRelationshipTypes"/>




            <h3>Workflow</h3>

            <p>Persons <ice:outputText rendered="#{fillDbController.personsDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addPersons}"
                               id="addPersons"/>

            <p>Projects <ice:outputText rendered="#{fillDbController.projectsDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addProject}"
                               id="addProject"/>

            <p>Iterations <ice:outputText rendered="#{fillDbController.iterationsDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addIterations}"
                               id="addIterations"/>

            <p>Decisions <ice:outputText rendered="#{fillDbController.decisionsDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addDecisions}"
                               id="addDecisions"/>

            <p>Requirements <ice:outputText rendered="#{fillDbController.requirementsDone}" value="done!" style="color: green;" /></p>
            <ice:commandButton value="Do it!"
                               action="#{fillDbController.addRequirements}"
                               id="addRequirements"/>
            
        </ice:form>
    </ui:define>

    <ui:define name="sidebar">
    </ui:define>
</ui:composition>